<template>
  <div class="show">
    <van-popup v-model="show" round
      >提示
      <div class="top">确认退出?</div>
      <div class="footer">
        <van-button type="default" size="large" @click="out">取消</van-button
        ><van-button type="default" size="large" @click="btn" style="color:red"
          >确认</van-button
        >
      </div>
    </van-popup>
  </div>
</template>
<script>
import { removeToken } from '@/utils/token.js'
import { mapMutations } from 'vuex'
export default {
  computed: {},
  data () {
    return {
      show: false
    }
  },
  methods: {
    ...mapMutations(['setIsLogin']),
    btn () {
      this.show = false
      this.setIsLogin(false)
      this.$router.push('/Login')
      removeToken()
    },
    out () {
      this.show = false
    }
  }
}
</script>
<style lang="less" scoped>
.show {
  /deep/.van-popup--center.van-popup--round {
    width: 90%;
    text-align: center;
    padding-top: 25px;
    font-size: 13px;
  }
  .top {
    margin-top: 10px;
    margin-bottom: 15px;
    font-size: 11px;
    color: #646566;
  }
  .footer {
    display: flex;
    justify-content: space-between;
    overflow: hidden;
    /deep/ .van-button__text {
      font-size: 12px;
    }
  }
}
</style>
